<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/1/9
  Time: 14:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户注册</title>
    <style type="text/css">

        div {
            text-align:center;
            position: relative;
            top: 50%;
        }
    </style>
    <script type="text/javascript">
        function checkPass(){

            var psd1=document.getElementById("pass1").value;
            var psd2=document.getElementById("pass2").value;
            var us =document.getElementById("username").value;
            if (us ==""||psd1==""||psd2=="")
            {
                alert("用户名或密码为空")
                return (false);
            }
            if(psd1!=psd2){
                alert("密码不一致，请重新输入！");
                return (false);
            }
            return (true);
        }
    </script>
</head>
<body>
<div>
    <form  method="post" action="RegisterServlet_dtt" onsubmit="return checkPass()">
        <label for="username">账户:</label>
        <input type="text" name="username"  id="username"/>
        <br><br>
        <label for="pass1">密码:</label>
        <input type="password" name="pass1" id = "pass1" />
        <br><br>
        <label for="pass2">再次确认密码:</label>
        <input type="password" name="pass2" id = "pass2" />
        <br><br>
        <input type="submit" value="注册" name="submitBtn"/>
    </form>
</div>
</body>
</html>
